import React from 'react';
import ReactDOM from 'react-dom/client';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/lib/locale/zh_CN';
import App from './App';
import './styles/global.less';

// 导入全局状态管理
import { ApiSettingsProvider } from './contexts/ApiSettingsContext';
import { AuthProvider } from './stores/authProvider';

// 创建一个根容器
const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);

// 渲染应用
root.render(
  <React.StrictMode>
    <ConfigProvider locale={zhCN}>
      <ApiSettingsProvider>
        <AuthProvider>
          <App />
        </AuthProvider>
      </ApiSettingsProvider>
    </ConfigProvider>
  </React.StrictMode>
); 